﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using DateGenerator;

namespace DateGeneratorTests
{
    [TestClass]
    public class DataGenerator_Test_IncorrectArgumentOrder
    {
        private RandomDate _sut;
        private DateTime _pastLowerBoundary;
        private DateTime _pastUpperBoundary;

        private DateTime _futureUpperBoundary;
        private DateTime _futureLowerBoundary;

        [TestInitialize]
        public void TestSetUp()
        {

            _sut = new RandomDate();

            _pastLowerBoundary = new DateTime(2010, 04, 22);
            _pastUpperBoundary = new DateTime(2010, 05, 01);

            _sut.UpperBoundary = _pastLowerBoundary;
            _sut.LowerBoundary = _pastUpperBoundary;
        }

        [TestMethod]
        public void Generate_Should_Throw_Exception()
        {
            AssertThrows.Throws<ArgumentOutOfRangeException>(()=>_sut.Generate());
        }
       
    }
}
